package model.db.table;

import model.db.Delete;
import model.db.Insert;
import model.db.Update;

/**
 * Author: Raoux Etienne
 * Student login: jc218934
 * Student number: 12448190
 * email: etienne.raoux@my.jcu.edu.au
 * alt email: jc218934@gmail.com
 */
public abstract class Table
{
    public void insertInDb()
    {
        Insert.row(this);
    }

    public abstract String [] getTableNames();
    public abstract String [] getPrimaryKeyNames();
    public abstract Object [] getPrimaryKeyValues();
    public abstract Class [] getPrimaryKeyTypes();
    public abstract String [] getColumnNames();
    public abstract Object [] getColumnValues();
    public abstract Class [] getColumnTypes();
    public abstract void initValues(Object [] values);

    public static void createTable()
    {
        System.out.println("createTable not yet implemented");
    }

    public void delete()
    {
        Delete.row(this);
    }

    public void update()
    {
        Update.row(this);
    }

}
